package com.heima.user.feign;

import com.heima.common.dto.ResponseResult;
import com.heima.user.dto.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @BelongsProject: heima-leadnews
 * @BelongsPackage: com.heima.user.feign
 * @Author: wangjian
 * @CreateTime: 2022-06-29  00:29
 * @Description: TODO
 * @Version: 1.0
 */
@FeignClient(value = "leadnews-media")
public interface MediaFeign {
    /**
     * 保存自媒体用户
     *
     * @param user
     * @return
     */
    @PostMapping("/api/v1/user")
    public ResponseResult<WmUser> saveWmUser(@RequestBody WmUser user);

  /**
   * @description: 更新自媒体用户
   * @author: wangjian
   * @param: user
   * @return: com.heima.common.dto.ResponseResult
   **/
    @PutMapping("/api/v1/user")
    public ResponseResult updateWmUser(@RequestBody WmUser user);
}


